package 并发编程10.final域里面的重排序问题;

import java.util.ArrayList;
import java.util.List;

/**
 * @author idea
 * @data 2019/1/26
 */
public class Test {

    public static void main(String[] args) {

        List<Thread> threads=new ArrayList<>();
        for(int i=0;i<100;i++){
            Thread threadRead=new Thread(new ThreadRead());
            Thread threadWrite=new Thread(new ThreadWrite());
            threads.add(threadRead);
            threads.add(threadWrite);
        }
        for (Thread thread : threads) {
            thread.start();
        }
    }
}
